- financial_year = FinancialYear.find_by(id: params[:current_financial_year])
- financial_year ||= FinancialYear.current
- if financial_year
  - main_financial_year_selector(financial_year)
  - params[:current_financial_year] ||= financial_year.id

- main_toolbar do |t|
  = t.new params: { redirect: nil }
  = link_to t("labels.consult_the_day_book", count: @draft_entries_count), { controller: :draft_journals, action: :show, redirection: backend_journals_path, current_financial_year: financial_year }, { class: [('btn btn-default no-icn'),('disabled' if @draft_entries_count < 1)] }
  - unless @unbalanced_entries_count < 1
    = link_to t("labels.consult_unbalanced_entries", count: @unbalanced_entries_count), { controller: :invalid_journal_entries, action: :index }, { class: 'btn btn-default no-icn' }
  - if FinancialYear.with_validated_entries.include? financial_year
    = t.export :general_journal, key: Printers::GeneralJournalPrinter.build_key(financial_year: financial_year)

= main_list
